package com.fileshare.web.dto.Bo;

import com.fileshare.web.entity.Authority;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AuthorityBo {
    private Integer id;
    private String authorityName;

    public static Authority toEntity(AuthorityBo authorityBo) {
        Authority authority = new Authority();
        BeanUtils.copyProperties(authorityBo, authority);
        return authority;
    }

}
